#!/usr/bin/env bash
#
# The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
# (the "License"). You may not use this work except in compliance with the License, which is
# available at www.apache.org/licenses/LICENSE-2.0
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied, as more fully set forth in the License.
#
# See the NOTICE file distributed with this work for information regarding copyright ownership.
#

# Copy this file as alluxio-env.sh and edit it to configure Alluxio for your
# site. This file is sourced to launch Alluxio servers or use Alluxio shell
# commands.
#
# This file is an optional approach to configure Alluxio options by setting the
# following listed environment variables. Note that, setting this file will not
# affect jobs (e.g., Spark job or MapReduce job) that are using Alluxio client
# as a library. Alternatively, it is recommended to create alluxio-site.properties file,
# which supports all the configuration options provided by Alluxio
# (https://docs.alluxio.io/os/user/stable/en/reference/Properties-List.html),
# and is respected by both external jobs and Alluxio servers (or shell).

# This file also allows you to configure Alluxio remote debugging as outlined here:
# https://docs.alluxio.io/os/user/stable/en/operation/Troubleshooting.html#alluxio-remote-debug

# JVM is required to run Alluxio.
# If its path is not set in Shell, please specify either of following environment variables
# JAVA_HOME
# JAVA

# The directory where log files are stored. (Default: ${ALLUXIO_HOME}/logs).
# ALLUXIO_LOGS_DIR

# The hostname for log server. If set, remote logging is enabled.
# ALLUXIO_LOGSERVER_HOSTNAME
# If remote logging is enabled, the port for log server. (Default: 45600)
# ALLUXIO_LOGSERVER_PORT
# If remote logging is enabled, the directory where log server log files are stored. (Default: ${ALLUXIO_HOME}/logs)
# ALLUXIO_LOGSERVER_LOGS_DIR

# Config properties set for Alluxio master, worker and shell. (Default: "")
# E.g. "-Dalluxio.master.rpc.port=39999"
# ALLUXIO_JAVA_OPTS

# Config properties set for Alluxio master daemon. (Default: "")
# E.g. "-Dalluxio.master.rpc.port=39999"
# ALLUXIO_MASTER_JAVA_OPTS

# Config properties set for Alluxio job master daemon. (Default: "")
# E.g. " -javaagent:./jmx_prometheus_javaagent-0.16.0.jar=8080:./config.yaml "
# ALLUXIO_JOB_MASTER_JAVA_OPTS

# Config properties set for Alluxio worker daemon. (Default: "")
# E.g. "-Dalluxio.worker.rpc.port=49999" to set worker port, "-Xms2048M -Xmx2048M" to limit the heap size of worker.
# ALLUXIO_WORKER_JAVA_OPTS

# Config properties set for Alluxio job worker daemon. (Default: "")
# E.g. " -javaagent:./jmx_prometheus_javaagent-0.16.0.jar=18080:./config.yaml "
# ALLUXIO_JOB_WORKER_JAVA_OPTS

# Config properties set for Alluxio proxy daemon. (Default: "")
# E.g. "-Xms2048M -Xmx2048M" to limit the heap size of proxy.
# ALLUXIO_PROXY_JAVA_OPTS

# Config properties set for Alluxio log server daemon. (Default: "")
# E.g. "-Xms2048M -Xmx2048M" to limit the heap size of log server.
# ALLUXIO_LOGSERVER_JAVA_OPTS

# Config properties set for Alluxio shell. (Default: "")
# E.g. "-Dalluxio.user.file.writetype.default=CACHE_THROUGH"
# ALLUXIO_USER_JAVA_OPTS

# Additional classpath entries for Alluxio processes. (Default: "")
# E.g. "/path/to/library1/:/path/to/library2/"
# ALLUXIO_CLASSPATH

# Configuring remote debugging for Alluxio master process. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60001"
# ALLUXIO_MASTER_ATTACH_OPTS

# Configuring remote debugging for Alluxio secondary master process. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60010"
# ALLUXIO_SECONDARY_MASTER_ATTACH_OPTS

# Configuring remote debugging for Alluxio job master process. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60002"
# ALLUXIO_JOB_MASTER_ATTACH_OPTS

# Configuring remote debugging for Alluxio worker process. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60003"
# ALLUXIO_WORKER_ATTACH_OPTS

# Configuring remote debugging for Alluxio job worker process. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60004"
# ALLUXIO_JOB_WORKER_ATTACH_OPTS

# Configuring remote debugging for Alluxio proxy process. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60005"
# ALLUXIO_PROXY_ATTACH_OPTS

# Configuring remote debugging for Alluxio log server process. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60006"
# ALLUXIO_LOGSERVER_ATTACH_OPTS

# Configuring remote debugging for Alluxio fuse process. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60009"
# ALLUXIO_FUSE_ATTACH_OPTS

# Configuring remote debugging for Alluxio shell. (Default: "")
# E.g. "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=60000"
# ALLUXIO_USER_ATTACH_OPTS

# Config LANG to support different characters in filenames
# export LANG=en_US.UTF-8
